package spring.bean;

import org.springframework.stereotype.Component;

@Component //注解方式的隐式配置bean
public class Person {

	private String name;

	public Person(){}

	public Person(String name) {
		this.name = name;
	}

	public void tellMyName() {
		System.out.println("我的名字是：" + name);
	}

	public void say(String name){
		
//		boolean flag = true;
//		if(flag){
//			throw new RuntimeException();
//		}
		System.out.println("你好：" + name);
	}
}
